package com.example.demo.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class TestController {

    @RequestMapping("test")
    public Map<String,String> test(){
        Map<String,String> map = new HashMap<>();

        map.put("name","张三");
        map.put("age","24");

        return map;
    }

    @RequestMapping("test2")
    public Map<String,String> test2(){
        Map<String,String> map = new HashMap<>();

        map.put("name","张三");
        map.put("age","24");

        return map;
    }
}
